%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
%	FONT FAMILES
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\ProvidesPackage{beamerfontthememsthlm}

% NEWPX FONT (Latex)

\if@donewPxFont%
% Load newPx Font %
\usefonttheme{professionalfonts}
\usefonttheme{serif}
\RequirePackage[T1]{fontenc}
\RequirePackage[full]{textcomp}
\RequirePackage[osf]{newpxtext} % osf for text, not math
\RequirePackage{cabin} % sans serif
\RequirePackage[varqu,varl]{inconsolata} % sans serif mono font
\RequirePackage[bigdelims,vvarbb]{newpxmath} % bb from STIX
\RequirePackage[cal=boondoxo]{mathalfa} % This package provides a standard means of setting math alphabets associated with the macros \mathcal, \mathbb, \mathfrak
\fi%

% PROPRIETARY STOCKHOLM STAD FONTS (XeTeX)

\if@dosthlmStadFont%
% Load sthlmStad Fonts %
\usefonttheme{professionalfonts}
\RequirePackage[no-math]{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\setsansfont[BoldFont={Sarasa Gothic SC}]{Source Han Serif CN}

\AtBeginEnvironment{tabular}{\setsansfont[BoldFont={Sarasa Gothic SC}, Numbers={Monospaced}]{WenQuanYi Micro Hei Mono Light}}
\fi%

%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
%	FONT ASSIGMENTS
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% Title Page
\setbeamerfont{title}{family=\sffamily, series=\scshape, size=\huge}
\setbeamerfont{subtitle}{size=\normalsize}
\setbeamerfont{date}{size=\normalsize}
\setbeamerfont{author}{size=\large}
\setbeamerfont{institute}{size=\large}

% Section
\setbeamerfont{section title}{size=\Large}

% Content
\setbeamerfont{frametitle}{family=\sffamily, size=\Large}
\setbeamerfont{copyright text}{size=\tiny}
\setbeamerfont{block title}{series=\sffamily, size=\large}
\setbeamerfont{block title alerted}{family=\sffamily, size=\large}
\setbeamerfont{alerted text}{series=\scshape}
\setbeamerfont{block title example}{family=\sffamily, size=\large}
\setbeamerfont{example text}{series=\scshape}

\setbeamerfont{caption}{size=\small}
\setbeamerfont{caption name}{family=\small}

\setbeamerfont{page number in head/foot}{size=\scriptsize}
\setbeamerfont{section in toc}{series=\sffamily, size=\large}

\linespread{1.15}